.class public abstract Les/mz;
.super Ljava/lang/Object;
.source "SingleColumnMenuToolbar.java"

# interfaces
.implements Les/iz$g;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/mz$c;
    }
.end annotation


# instance fields
.field private a:Landroid/content/Context;

.field private b:I

.field private c:Landroid/view/View;

.field protected d:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Les/v00;",
            ">;"
        }
    .end annotation
.end field

.field private e:Landroid/util/SparseArray;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/util/SparseArray<",
            "Les/mz$c;",
            ">;"
        }
    .end annotation
.end field

.field private f:Lcom/estrongs/android/ui/theme/b;

.field private g:Landroid/widget/LinearLayout;

.field private h:I

.field private i:Landroid/view/View$OnClickListener;

.field private j:Landroid/view/View$OnLongClickListener;


# direct methods
.method public constructor <init>(Landroid/content/Context;I)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    iput-object v0, p0, Les/mz;->d:Ljava/util/List;

    .line 3
    new-instance v0, Landroid/util/SparseArray;

    invoke-direct {v0}, Landroid/util/SparseArray;-><init>()V

    iput-object v0, p0, Les/mz;->e:Landroid/util/SparseArray;

    .line 4
    new-instance v0, Les/mz$a;

    invoke-direct {v0, p0}, Les/mz$a;-><init>(Les/mz;)V

    iput-object v0, p0, Les/mz;->i:Landroid/view/View$OnClickListener;

    .line 5
    new-instance v0, Les/mz$b;

    invoke-direct {v0, p0}, Les/mz$b;-><init>(Les/mz;)V

    iput-object v0, p0, Les/mz;->j:Landroid/view/View$OnLongClickListener;

    .line 6
    iput-object p1, p0, Les/mz;->a:Landroid/content/Context;

    .line 7
    iput p2, p0, Les/mz;->b:I

    .line 8
    invoke-static {}, Lcom/estrongs/android/ui/theme/b;->r()Lcom/estrongs/android/ui/theme/b;

    move-result-object p1

    iput-object p1, p0, Les/mz;->f:Lcom/estrongs/android/ui/theme/b;

    .line 9
    invoke-direct {p0}, Les/mz;->b()V

    return-void
.end method

.method static synthetic a(Les/mz;)I
    .locals 0

    .line 1
    iget p0, p0, Les/mz;->b:I

    return p0
.end method

.method private a(Les/v00;Les/mz$c;Z)V
    .locals 8

    .line 19
    invoke-static {p2}, Les/mz$c;->b(Les/mz$c;)Landroid/widget/Button;

    move-result-object p3

    .line 20
    iget-object v0, p0, Les/mz;->a:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0700c6

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    .line 21
    invoke-virtual {p1}, Les/v00;->getIcon()Landroid/graphics/drawable/Drawable;

    move-result-object v1

    const v2, 0x7f0602dd

    if-nez v1, :cond_0

    .line 22
    iget-object v1, p0, Les/mz;->f:Lcom/estrongs/android/ui/theme/b;

    invoke-virtual {p1}, Les/v00;->d()I

    move-result v3

    invoke-virtual {v1, v3}, Lcom/estrongs/android/ui/theme/b;->c(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    if-eqz v1, :cond_2

    .line 23
    iget-object v3, p0, Les/mz;->f:Lcom/estrongs/android/ui/theme/b;

    invoke-virtual {v3, v2}, Lcom/estrongs/android/ui/theme/b;->a(I)I

    move-result v2

    invoke-static {v1, v2}, Les/fy;->a(Landroid/graphics/drawable/Drawable;I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 24
    invoke-virtual {p1, v1}, Les/v00;->setIcon(Landroid/graphics/drawable/Drawable;)Les/v00;

    goto :goto_0

    .line 25
    :cond_0
    instance-of v3, v1, Landroidx/appcompat/graphics/drawable/DrawableWrapper;

    if-eqz v3, :cond_1

    .line 26
    iget-object v3, p0, Les/mz;->f:Lcom/estrongs/android/ui/theme/b;

    invoke-virtual {v3, v2}, Lcom/estrongs/android/ui/theme/b;->a(I)I

    move-result v2

    invoke-static {v1, v2}, Landroidx/core/graphics/drawable/DrawableCompat;->setTint(Landroid/graphics/drawable/Drawable;I)V

    goto :goto_0

    .line 27
    :cond_1
    iget-object v3, p0, Les/mz;->f:Lcom/estrongs/android/ui/theme/b;

    invoke-virtual {v3, v2}, Lcom/estrongs/android/ui/theme/b;->a(I)I

    move-result v2

    invoke-static {v1, v2}, Les/fy;->a(Landroid/graphics/drawable/Drawable;I)Landroid/graphics/drawable/Drawable;

    :cond_2
    :goto_0
    const/4 v2, 0x0

    if-eqz v1, :cond_3

    .line 28
    invoke-virtual {v1, v2, v2, v0, v0}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 29
    :cond_3
    invoke-virtual {p1}, Les/v00;->b()Z

    move-result v3

    const/4 v4, 0x0

    if-eqz v3, :cond_4

    .line 30
    invoke-virtual {p1}, Les/v00;->h()Landroid/graphics/drawable/Drawable;

    move-result-object v3

    if-nez v3, :cond_5

    .line 31
    :try_start_0
    iget-object v5, p0, Les/mz;->a:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    invoke-virtual {p1}, Les/v00;->i()I

    move-result v6

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    .line 32
    invoke-virtual {v3}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v5

    int-to-float v5, v5

    const/high16 v6, 0x3f800000    # 1.0f

    mul-float v5, v5, v6

    invoke-virtual {v3}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v7

    int-to-float v7, v7

    div-float/2addr v5, v7

    mul-float v5, v5, v6

    int-to-float v6, v0

    mul-float v6, v6, v5

    float-to-int v5, v6

    .line 33
    invoke-virtual {v3, v2, v2, v5, v0}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 34
    invoke-virtual {p1, v3}, Les/v00;->a(Landroid/graphics/drawable/Drawable;)Les/v00;
    :try_end_0
    .catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    nop

    goto :goto_1

    :cond_4
    move-object v3, v4

    .line 35
    :cond_5
    :goto_1
    invoke-virtual {p3, v1, v4, v3, v4}, Landroid/widget/Button;->setCompoundDrawables(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    .line 36
    invoke-virtual {p1}, Les/v00;->getTitle()Ljava/lang/CharSequence;

    move-result-object v0

    if-nez v0, :cond_6

    .line 37
    invoke-virtual {p1}, Les/v00;->k()I

    move-result v0

    invoke-virtual {p3, v0}, Landroid/widget/Button;->setText(I)V

    goto :goto_2

    .line 38
    :cond_6
    invoke-virtual {p3, v0}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 39
    :goto_2
    invoke-static {p2}, Les/mz$c;->c(Les/mz$c;)Landroid/view/View;

    move-result-object p3

    invoke-virtual {p1}, Les/v00;->a()Z

    move-result v0

    if-eqz v0, :cond_7

    const/4 v0, 0x0

    goto :goto_3

    :cond_7
    const/16 v0, 0x8

    :goto_3
    invoke-virtual {p3, v0}, Landroid/view/View;->setVisibility(I)V

    .line 40
    invoke-virtual {p1}, Les/v00;->c()Z

    move-result p1

    if-nez p1, :cond_8

    .line 41
    invoke-static {p2}, Les/mz$c;->a(Les/mz$c;)Landroid/view/View;

    move-result-object p1

    invoke-virtual {p1, v2}, Landroid/view/View;->setEnabled(Z)V

    goto :goto_4

    .line 42
    :cond_8
    invoke-static {p2}, Les/mz$c;->a(Les/mz$c;)Landroid/view/View;

    move-result-object p1

    const/4 p3, 0x1

    invoke-virtual {p1, p3}, Landroid/view/View;->setEnabled(Z)V

    .line 43
    :goto_4
    invoke-virtual {p2}, Les/mz$c;->b()V

    return-void
.end method

.method static synthetic b(Les/mz;)Landroid/content/Context;
    .locals 0

    .line 1
    iget-object p0, p0, Les/mz;->a:Landroid/content/Context;

    return-object p0
.end method

.method private b()V
    .locals 3

    .line 2
    iget-object v0, p0, Les/mz;->a:Landroid/content/Context;

    invoke-static {v0}, Lcom/estrongs/android/pop/esclasses/h;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f0c030f

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Les/mz;->c:Landroid/view/View;

    const v1, 0x7f09040a

    .line 3
    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Les/mz;->g:Landroid/widget/LinearLayout;

    return-void
.end method

.method private c(I)V
    .locals 7

    .line 1
    iget v0, p0, Les/mz;->h:I

    if-le v0, p1, :cond_0

    move v0, p1

    .line 2
    :goto_0
    iget v1, p0, Les/mz;->h:I

    if-ge v0, v1, :cond_2

    .line 3
    iget-object v1, p0, Les/mz;->e:Landroid/util/SparseArray;

    invoke-virtual {v1, v0}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Les/mz$c;

    .line 4
    invoke-virtual {v1}, Les/mz$c;->a()V

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    :goto_1
    if-ge v0, p1, :cond_2

    .line 5
    iget-object v1, p0, Les/mz;->e:Landroid/util/SparseArray;

    invoke-virtual {v1, v0}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Les/mz$c;

    if-nez v1, :cond_1

    .line 6
    invoke-virtual {p0, v0}, Les/mz;->a(I)Les/mz$c;

    move-result-object v1

    .line 7
    iget-object v2, p0, Les/mz;->e:Landroid/util/SparseArray;

    invoke-virtual {v2, v0, v1}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 8
    iget-object v2, p0, Les/mz;->g:Landroid/widget/LinearLayout;

    invoke-static {v1}, Les/mz$c;->a(Les/mz$c;)Landroid/view/View;

    move-result-object v1

    new-instance v3, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v4, -0x1

    iget-object v5, p0, Les/mz;->a:Landroid/content/Context;

    .line 9
    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f0700ea

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v5

    invoke-direct {v3, v4, v5}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 10
    invoke-virtual {v2, v1, v3}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    goto :goto_2

    .line 11
    :cond_1
    invoke-virtual {v1}, Les/mz$c;->b()V

    :goto_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    .line 12
    :cond_2
    iput p1, p0, Les/mz;->h:I

    return-void
.end method


# virtual methods
.method public a()Landroid/view/View;
    .locals 1

    .line 44
    iget-object v0, p0, Les/mz;->c:Landroid/view/View;

    return-object v0
.end method

.method protected a(I)Les/mz$c;
    .locals 3

    .line 9
    iget-object v0, p0, Les/mz;->a:Landroid/content/Context;

    invoke-static {v0}, Lcom/estrongs/android/pop/esclasses/h;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f0c01d4

    const/4 v2, 0x0

    .line 10
    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    const v1, 0x7f0901c6

    .line 11
    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    .line 12
    new-instance v2, Les/mz$c;

    invoke-direct {v2, p0}, Les/mz$c;-><init>(Les/mz;)V

    .line 13
    invoke-static {v2, v0}, Les/mz$c;->a(Les/mz$c;Landroid/view/View;)Landroid/view/View;

    .line 14
    invoke-static {v2, v1}, Les/mz$c;->a(Les/mz$c;Landroid/widget/Button;)Landroid/widget/Button;

    const v1, 0x7f09099b

    .line 15
    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-static {v2, v0}, Les/mz$c;->b(Les/mz$c;Landroid/view/View;)Landroid/view/View;

    .line 16
    invoke-static {v2}, Les/mz$c;->a(Les/mz$c;)Landroid/view/View;

    move-result-object v0

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    invoke-virtual {v0, p1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 17
    invoke-static {v2}, Les/mz$c;->a(Les/mz$c;)Landroid/view/View;

    move-result-object p1

    iget-object v0, p0, Les/mz;->i:Landroid/view/View$OnClickListener;

    invoke-virtual {p1, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 18
    invoke-static {v2}, Les/mz$c;->a(Les/mz$c;)Landroid/view/View;

    move-result-object p1

    iget-object v0, p0, Les/mz;->j:Landroid/view/View$OnLongClickListener;

    invoke-virtual {p1, v0}, Landroid/view/View;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    return-object v2
.end method

.method public abstract a(ILes/v00;)V
.end method

.method public a(Ljava/util/List;)V
    .locals 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Les/v00;",
            ">;)V"
        }
    .end annotation

    .line 2
    iput-object p1, p0, Les/mz;->d:Ljava/util/List;

    .line 3
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result p1

    .line 4
    iget v0, p0, Les/mz;->h:I

    if-eq p1, v0, :cond_0

    .line 5
    invoke-direct {p0, p1}, Les/mz;->c(I)V

    :cond_0
    const/4 v0, 0x0

    const/4 v1, 0x0

    :goto_0
    if-ge v1, p1, :cond_2

    .line 6
    iget-object v2, p0, Les/mz;->e:Landroid/util/SparseArray;

    invoke-virtual {v2, v1}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Les/mz$c;

    .line 7
    iget-object v3, p0, Les/mz;->d:Ljava/util/List;

    invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Les/v00;

    if-nez v1, :cond_1

    const/4 v4, 0x1

    goto :goto_1

    :cond_1
    const/4 v4, 0x0

    .line 8
    :goto_1
    invoke-direct {p0, v3, v2, v4}, Les/mz;->a(Les/v00;Les/mz$c;Z)V

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_2
    return-void
.end method

.method public b(I)Les/v00;
    .locals 1

    .line 4
    :try_start_0
    iget-object v0, p0, Les/mz;->d:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Les/v00;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-object p1

    :catch_0
    const/4 p1, 0x0

    return-object p1
.end method
